package cn.iocoder.yudao.module.pickbook.dal.mysql.classes;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.pickbook.dal.dataobject.classes.classesDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.pickbook.controller.admin.classes.vo.*;

/**
 * 班级 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface classesMapper extends BaseMapperX<classesDO> {

    default PageResult<classesDO> selectPage(classesPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<classesDO>()
                .likeIfPresent(classesDO::getName, reqVO.getName())
                .eqIfPresent(classesDO::getCreatorId, reqVO.getCreatorId())
                .orderByDesc(classesDO::getId));
    }

}